<template>
  <div>
    <keep-alive :exclude="exclude">
      <router-view v-if="refresh && $route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="refresh && !$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
  import { mapState } from 'vuex'
  /** 全部二级空路由使用此页面，不使用render，以免3级路由缓存bug **/
  /** 该bug表现为不同的render的二级路由下面的三级路由切换时导致页面无法正常跳转 **/
  export default {
    name: "empty-router-view",
    computed:{
      ...mapState({
        'exclude': state => state.pageTabs.exclude,
        'refresh': state => state.pageTabs.refresh
      })
    }
  }
</script>

<style scoped>

</style>
